/*
 * @Author: Shane
 * @Date: 2022-06-01 15:16:36
 * @LastEditTime: 2022-06-01 15:16:52
 * @LastEditors: Shane
 * @Description: 
 * @FilePath: /supmea_http/lib/supmea_http_method.dart
 */

enum HttpMethod {
  get,
  post,
  put,
  delete,
  head,
  patch,
}

extension HttpMethodValue on HttpMethod {
  String value() {
    String result = "POST";
    switch (this) {
      case HttpMethod.get:
        {
          result = 'GET';
        }
        break;
      case HttpMethod.post:
        {
          result = 'POST';
        }
        break;
      case HttpMethod.put:
        {
          result = 'PUT';
        }
        break;
      case HttpMethod.delete:
        {
          result = 'DELETE';
        }
        break;
      case HttpMethod.head:
        {
          result = 'HEAD';
        }
        break;
      case HttpMethod.patch:
        {
          result = 'PATCH';
        }
        break;
    }

    return result;
  }
}
